<!--conf
<sample>
              <product version="1.5" edition="pro"/>
                     <modifications>
                            <modified date="070101"/>
                     </modifications>
               </sample>
 --> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title> Custom error handlers</title>
</head>

<body>
	<h1>Custom error handlers</h1>
  <p>The current sample demonstrates how custom errors notifications look like. You can ealisy set the error handler using the code mentioned below.</p>

	
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<table>
		<tr>
			<td>
				<div id="treeboxbox_tree" style="width:250px; height:218px;background-color:#f5f5f5;border :1px solid Silver;"/>
			</td>
			<td rowspan="2" style="padding-left:25" valign="top">

			</td>
		</tr>
		<tr>
			<td></td>
		</tr>
	</table>

	<script>

            function my_error_handler(type, name, data){
				if(type=="LoadXML")
               		 alert("My error handler \n"+name+"\n Status:"+data[0].status);
            }
            dhtmlxError.catchError("LoadXML",my_error_handler);

            dhtmlxError.catchError("DataStructure",my_error_handler);
			
			tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);

			
			tree.setSkin('dhx_skyblue');
			tree.setImagePath("../../../codebase/imgs/dhxtree_skyblue/");
			tree.loadXML("incorrect.xml")
	</script>
<br><br>

</body>
</html>
